= kujaku do |k|
  - k.text
  - k.helper do
    %label= Plant.human_attribute_name(:variety)
    = select_tag(:variety, options_for_select([[]] + Plant.unique_varieties.map{ |v| [v.human_name, v.name.to_s] }.sort_by(&:first), params[:variety].to_s))
  - if Plant.where.not(born_at: nil).any?
    - k.helper do
      = plant_period_crit(label: Plant.human_attribute_name(:born_at), name: :born_at)
  - if Plant.where.not(dead_at: nil).any?
    - k.helper do
      = plant_period_crit(label: Plant.human_attribute_name(:dead_at), name: :dead_at)
  - k.helper do
    - max = plants_max_area.in_hectare.to_f.ceil.in_hectare
    .range-slider
      %label= Plant.human_attribute_name(:net_surface_area)
      %span.range-minimum= 0.in_hectare.l(precision: 0)
      %input{ name: :area, data: { slider: { min: 0, max: max.to_f.round, value: area_range_slider_value(max.to_f), step: 0.1, tooltip_split: true }, provide: 'slider' } }
      %span.range-maximum= max.l(precision: 0)

= janus do |j|
  - if current_campaign && Plant.of_campaign(current_campaign).any?
    - j.face :map do
      = plants_map(main: true, optional_data_url: backend_visualizations_non_treatment_areas_visualizations_path)

  - j.face :list do
    = main_list
